﻿using System.Collections.Generic;
/// <summary>
/// 聊天成员
/// </summary>
public class Member:ChatObject
{

}
/// <summary>
/// 房间比较器，比较两个房间是否完全相等
/// </summary>
public class MemberComparer : IEqualityComparer<Member>
{
    public bool Equals(Member x, Member y)
    {
        if (x == null && y == null)
            return true;
        else if (x == null || y == null)
            return false;
        else
        {
            if (x.Equals(y))
                return true;
            return false;
        }
    }
    public int GetHashCode(Member obj)
    {
        return obj.GetHashCode();
    }
}
/// <summary>
/// 两个房间Id一样则返回真
/// </summary>
public class MemberIdComparer : IEqualityComparer<Member>
{
    public bool Equals(Member x, Member y)
    {
        if (x == null && y == null)
            return true;
        else if (x == null || y == null)
            return false;
        else
        {
            if (x.Id == y.Id)
                return true;
            return false;
        }
    }
    public int GetHashCode(Member obj)
    {
        return obj.GetHashCode();
    }
}